import { createSlice, PayloadAction } from '@reduxjs/toolkit'

/* BreadcrumbState */
export interface BreadcrumbState {
	breadcrumbList: {
		[propName: string]: any;
	};
}

const initialState: BreadcrumbState = {
  breadcrumbList: {},
};


export const globalSlice = createSlice({
  name: 'global',
  initialState,
  reducers: {
    setBreadcrumbList: (state, action: PayloadAction<{
      [propName: string]: any;
    }>) => {
      state.breadcrumbList = action.payload
    },
  },
})

export const { setBreadcrumbList } = globalSlice.actions

export default globalSlice.reducer